<?php
	require_once("../../../include/connect.php");
	
	$hoten = mysql_real_escape_string(strip_tags($_POST["hoten"]));
	$hocvi = mysql_real_escape_string(strip_tags($_POST["hocvi"]));
	$mon = mysql_real_escape_string(strip_tags($_POST["mon"]));
	$id = $_POST["id"];
	
	$query = mysql_query(" UPDATE teachers SET name = N'{$hoten}', degree = N'{$hocvi}', subject = '{$mon}' WHERE id = {$id} ");
	
	if($query)
		echo "0";
	else
		echo "1";
?>